<template>
  <div id="topnav">
    <ul>
      <li class="active">会员列表</li>
      <li>储值管理</li>
      <li>积分管理</li>
      <li>积分设置</li>
    </ul>
    <div class="right">
      <div @click="openDialog">添加</div>
      <div class="del" @click="batchDel">批量删除</div>
      <div class="output">&gt; 导出</div>
    </div>
  </div>
</template>

<script>
import Bus from "../../../utils/BUS";
export default {
  methods: {
    batchDel() {
      Bus.$emit("batchDel");
    },
    openDialog() {
      Bus.$emit("openDialog");
    },
  },
};
</script>

<style lang="less">
#topnav {
  padding-bottom: 20px;
  border-bottom: 1px solid #999;
  display: flex;
  justify-content: space-between;
  ul {
    display: flex;
    flex-shrink: 0;
    width: 400px;
    cursor: pointer;

    li:nth-child(1) {
      border-top-left-radius: 5px;
      border-bottom-left-radius: 5px;
    }
    li:nth-last-child(1) {
      border-top-right-radius: 5px;
      border-bottom-right-radius: 5px;
    }
    li {
      background-color: white;
      padding: 15px;
      box-sizing: border-box;
      border: 1px solid rgba(0, 0, 0, 0.5);
      color: #bbb;
    }
    .active {
      background-color: #666ee8;
      color: white;
    }
  }
  .right {
    display: flex;
    text-align: center;
    div {
      width: 100px;
      padding: 15px;
      box-sizing: border-box;
      border: 1px solid #666ee8;
      border-radius: 5px;
      color: #666ee8;
      cursor: pointer;
    }
  }
}
</style>
